/**
 * 单个交易类型
 */

export type Trade = {
	address : string,
	contact : string,
	id : number,
	lat : number,
	lng : number,
	message : string,
	openid : string,
	type : "sell" | "buy"
}



/**
 * 获取获取交易列表数据
*/
import http from "../utils/request"


export function getTradeList(){
	return http.get<Trade[]>('/trades')
}

/**
 * 获取交易详情
 */
export function getTradeInfo(id: string){
	return http.get(`/trades/${id}`)
}